cmake_minimum_required(VERSION 3.0)

project(2048)

# target path
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/../lib/dll)
# source path
aux_source_directory(api API)
# generate target as dll
add_library(api SHARED ${API})

# link Lua lib
find_package(Lua51 REQUIRED)
target_link_libraries(api ${LUA_LIBRARIES})

# change name: eg. libmat.so -> mat.so
set_target_properties(api PROPERTIES PREFIX "")
